<?php

namespace paper\attribute;

use Attribute;
use paper\App;

#[Attribute]
class WithoutMiddleware
{
    private App $app;
    private array $middlewares;

    public function __construct(App $app, $value)
    {
        $this->app = $app;
        $this->middlewares = $value;
    }

    public function execute()
    {
        $this->app->router->removeMiddlewares($this->middlewares);
    }
}